package cate.game.train.rune.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

import java.util.List;

@ClientMsg(title = "徽章合成 の 请求")
@OperationSetter(value = GDOperation.RUNE_FORGE, sub = "type")
public class RuneForgeReq implements MsgInput {
    @NoteField(value = "合成方式")
    public int type;

    @NoteField(value = "参与合成徽章的uid")
    public List<String> uids;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        game.train.rune.forge(cc.getRole(), type, uids);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.RUNE_FORGE_REQ;
    }
}
